package cn.wolfcode.util;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Setter
@Getter
@NoArgsConstructor
public class AjaxResult {
    private int code;
    private String msg;
    private Object data;

    public AjaxResult(int code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }
    public static AjaxResult success(){

       return new AjaxResult(200,"操作成功",null);
    }
    public static AjaxResult erorr(){

       return new AjaxResult(500,"操作失败",null);
    }
}
